802788b4: 27 bd ff d8  ADDIU sp, sp, 0xffffffd8 (-40)
802788b8: af bf 00 14  SW ra, sp, 0x14 (20)
802788bc: af a4 00 28  SW a0, sp, 0x28 (40)
802788c0: af a5 00 2c  SW a1, sp, 0x2c (44)
802788c4: af a6 00 30  SW a2, sp, 0x30 (48)
802788c8: af a0 00 24  SW r0, sp, 0x24 (36)

802788cc: 8f ae 00 30  LW t6, sp, 0x30 (48)
802788d0: 8f af 00 2c  LW t7, sp, 0x2c (44)
802788d4: 24 01 ff f0  ADDIU at, r0, 0xfffffff0 (-16)
802788d8: 01 cf c0 23  SUBU t8, t6, t7
802788dc: 27 19 00 0f  ADDIU t9, t8, 0xf (15)
802788e0: 03 21 40 24  AND t0, t9, at
802788e4: af a8 00 20  SW t0, sp, 0x20 (32)                [sp + 0x20] = (arg3 - arg2 + 15) & 0xfffffff0;

802788e8: 8f a4 00 20  LW a0, sp, 0x20 (32)
802788ec: 0c 09 e0 48  JAL 0x80278120 (-2144894688)        [sp + 0x1c] = _pool_alloc([sp + 0x20], 1);
802788f0: 24 05 00 01  ADDIU a1, r0, 0x1 (1)
802788f4: af a2 00 1c  SW v0, sp, 0x1c (28)

802788f8: 8f a9 00 1c  LW t1, sp, 0x1c (28)
802788fc: 25 2a 00 04  ADDIU t2, t1, 0x4 (4)               [sp + 0x18] = [sp + 0x1c] + 4;
80278900: af aa 00 18  SW t2, sp, 0x18 (24)

80278904: 8f ab 00 1c  LW t3, sp, 0x1c (28)
80278908: 11 60 00 11  BEQ r0, t3, 0x80278950 (pc + 0x44)  if (![sp + 0x1c]) goto 0x80278950;
8027890c: 00 00 00 00  NOP

80278910: 8f a4 00 1c  LW a0, sp, 0x1c (28)
80278914: 8f a5 00 2c  LW a1, sp, 0x2c (44)
80278918: 0c 09 e1 41  JAL 0x80278504 (-2144893692)        DmaCopy([sp + 0x1c], arg2, arg3);
8027891c: 8f a6 00 30  LW a2, sp, 0x30 (48)

80278920: 3c 05 80 1c  LUI a1, 0x801c (32796)
80278924: 24 a5 10 00  ADDIU a1, a1, 0x1000 (4096)
80278928: 0c 09 fd 38  JAL 0x8027f4e0 (-2144865056)        uncompress([sp + 0x1c], 0x801c1000);
8027892c: 8f a4 00 1c  LW a0, sp, 0x1c (28)

80278930: 3c 05 80 1c  LUI a1, 0x801c (32796)
80278934: 24 a5 10 00  ADDIU a1, a1, 0x1000 (4096)
80278938: 0c 09 df b8  JAL 0x80277ee0 (-2144895264)        set_segment_base(arg1, 0x801c1000);
8027893c: 8f a4 00 28  LW a0, sp, 0x28 (40)

80278940: 0c 09 e0 8e  JAL 0x80278238 (-2144894408)        _pool_free([sp + 0x1c]);
80278944: 8f a4 00 1c  LW a0, sp, 0x1c (28)

80278948: 10 00 00 01  BEQ r0, r0, 0x80278950 (pc + 0x4)
8027894c: 00 00 00 00  NOP

80278950: 3c 02 80 1c  LUI v0, 0x801c (32796)              return 0x801c1000;
80278954: 10 00 00 03  BEQ r0, r0, 0x80278964 (pc + 0xc)
80278958: 24 42 10 00  ADDIU v0, v0, 0x1000 (4096)
8027895c: 10 00 00 01  BEQ r0, r0, 0x80278964 (pc + 0x4)
80278960: 00 00 00 00  NOP
80278964: 8f bf 00 14  LW ra, sp, 0x14 (20)
80278968: 27 bd 00 28  ADDIU sp, sp, 0x28 (40)
8027896c: 03 e0 00 08  JR ra
80278970: 00 00 00 00  NOP


void * proc0x802788b4(u32 index, u32 bottom, u32 top)
{
    [sp + 0x20] = (arg3 - arg2 + 15) & 0xfffffff0;
    [sp + 0x1c] = _pool_alloc([sp + 0x20], 1);
    [sp + 0x18] = [sp + 0x1c] + 4;
    if ([sp + 0x1c]) {
        DmaCopy([sp + 0x1c], arg2, arg3);
        uncompress([sp + 0x1c], 0x801c1000);
        set_segment_base(arg1, 0x801c1000);
        _pool_free([sp + 0x1c]);
    }
    return 0x801c1000;
}
